import React, { useState } from 'react';
// 
import Son from './Son';
// 在祖先组件提供数据
import contextObj from './context';

const { Provider } = contextObj

// console.log(useState());

const Father = () => {
    const [nameArr, setNameArr] = useState([{ id: 1, username: '大脚皇后' }, { id: 2, username: '胡惟庸' }])
    return (
        <div>
            朱元璋-洪武大帝
            <Provider value={nameArr}>
                <Son></Son>
            </Provider>
        </div>
    );
}

export default Father;
